/********************************************************************
	created:	2009:12:8   20:24:35
	filename: 	customsplitwnd.h
	author:		zouyf
	describe:	
*********************************************************************/
#pragma once
#include "../uitls.h"
#include "playlistlistbox.h"
#include "songlistbox.h"

class FCustomSplitWnd : public CSplitterWindow
{
public:
	BEGIN_MSG_MAP_EX(FCustomSplitWnd)
		MESSAGE_HANDLER_EX(WM_USER_SETSONGLISTIDX, DispatchMsg)
		MESSAGE_HANDLER_EX(WM_USER_CHANGEPLAYLIST, OnChangePlayList)
		COMMAND_CODE_HANDLER_EX(LBN_DBLCLK, OnDbClickItem)
		MSG_WM_CREATE(OnCreate)
		CHAIN_MSG_MAP(CSplitterWindow)
		REFLECT_NOTIFICATIONS()
		DEFAULT_REFLECTION_HANDLER()
	END_MSG_MAP()

	void Init(IApplication* pApp);
	int OnCreate(LPCREATESTRUCT lpCreateStruct);
	LRESULT DispatchMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
	LRESULT OnChangePlayList(UINT uMsg, WPARAM wParam, LPARAM lParam);
	void OnDbClickItem(UINT uNotifyCode, int nID, CWindow wndCtl);

private:
	FPlayListListBox m_playListListBox;
	FSongListBox m_songListBox;
	IApplication *m_pApp;
};
